const singleton = new Map()

export function checkSingleton(type) {
  if (!singleton.has(type)) {
    singleton.set(type, true)
  } else {
    throw new Error(`[ ${type[ 'name' ]} ] must be singleton`)
  }
}
